package view;

import java.util.List;

public class ResultMessage {
	private String code;
	private String message;
	private List<MessageDetail> detail;
	
	public ResultMessage(String code, String message){
		this.code = code;
		this.message = message;
	}
	public ResultMessage(String code, String message,
			List<MessageDetail> detail){
		this.code = code;
		this.message = message;
		this.detail = detail;
	}

	public String getCode() {
		return code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String toString(){
		return "["+ code + "]" + message;
	}
	public List<MessageDetail> getDetail() {
		return detail;
	}
	public int getDetailCount(){
		if (detail == null){
			return 0;
		}
		else{
			return detail.size();
		}
	}
}
